package entity;


import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Order implements Serializable {
    private Integer orderid;
    private User user;
    private Double cost;
    @DateTimeFormat(pattern = "yyyy-MM-dd")//springmvc 日期类型要加注解@DateTimeFormat 客户端输入的字符串封装到后台date
    @JSONField(format = "yyyy-MM-dd")//返回的json中有时间
    private Date createtime;
    private Integer ispayment;
    private List<OrderDetail> orderdetails;

}
